The type initializer for System.Linq.Dynamic.ExpressionParser threw an exception.

52

The type initializer for 'System.Linq.Dynamic.ExpressionParser' threw an exception. -

I'm also using Core 2.0 and was using System.Linq.Dynamic and got that error when I used an OrderBy extension, but I uninstalled it and installed System.Linq.Dynamic.Core instead, and now it's working perfectly


var data = (from app in _context.Applications select app);

//Sorting  
if (!(string.IsNullOrEmpty(sortColumn) && string.IsNullOrEmpty(sortColumnDir)))
{ 
    data = data.OrderBy(sortColumn + " " + sortColumnDir);
}

Comments

Submit
0 Comments